-- GENERATED SPELL FOR [Darkclaw Bat] --


function spell0_23959(pUnit, Event) --@Howling Screech,Self--
pUnit:FullCastSpellOnTarget(32651,pUnit)
pUnit:RegisterEvent('Sorts_23959', 6315, 1)
end

function spell1_23959(pUnit, Event) --@Ravenous Pathogen,n/a--
pUnit:FullCastSpellOnTarget(49980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23959', 30273, 1)
end

function Sorts_23959(pUnit, Event)
local choix_sorts_23959 = math.random(0, 1)
if choix_sorts_23959 == 0 then
pUnit:RegisterEvent('spell0_23959', 1, 1)
end
if choix_sorts_23959 == 1 then
pUnit:RegisterEvent('spell1_23959', 1, 1)
end
end

function mob23959_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23959', math.random(1500, 3000), 1)
end

function mob23959_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23959_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23959_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23959, 1, 'mob23959_Action')
RegisterUnitEvent(23959, 2, 'mob23959_Leave')
RegisterUnitEvent(23959, 3, 'mob23959_Kill')
RegisterUnitEvent(23959, 4, 'mob23959_Die')
